3.1.31 \(\int \frac {1}{(-5-3 \cos (c+d x))^2} \, dx\) [31]

Optimal. Leaf size=56 \[ \frac {5 x}{64}-\frac {5 \text {ArcTan}\left (\frac {\sin (c+d x)}{3+\cos (c+d x)}\right )}{32 d}-\frac {3 \sin (c+d x)}{16 d (5+3 \cos (c+d x))} \]

[Out]

5/64*x-5/32*arctan(sin(d*x+c)/(3+cos(d*x+c)))/d-3/16*sin(d*x+c)/d/(5+3*cos(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2743, 12, 2737} \begin {gather*} -\frac {5 \text {ArcTan}\left (\frac {\sin (c+d x)}{\cos (c+d x)+3}\right )}{32 d}-\frac {3 \sin (c+d x)}{16 d (3 \cos (c+d x)+5)}+\frac {5 x}{64} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-5 - 3*Cos[c + d*x])^(-2),x]

[Out]

(5*x)/64 - (5*ArcTan[Sin[c + d*x]/(3 + Cos[c + d*x])])/(32*d) - (3*Sin[c + d*x])/(16*d*(5 + 3*Cos[c + d*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2737

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{q = Rt[a^2 - b^2, 2]}, Simp[-x/q, x] - Sim
p[(2/(d*q))*ArcTan[b*(Cos[c + d*x]/(a - q + b*Sin[c + d*x]))], x]] /; FreeQ[{a, b, c, d}, x] && GtQ[a^2 - b^2,
 0] && NegQ[a]

Rule 2743

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((a + b*Sin[c + d*x])^(n
+ 1)/(d*(n + 1)*(a^2 - b^2))), x] + Dist[1/((n + 1)*(a^2 - b^2)), Int[(a + b*Sin[c + d*x])^(n + 1)*Simp[a*(n +
 1) - b*(n + 2)*Sin[c + d*x], x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && LtQ[n, -1] && Integ
erQ[2*n]

Rubi steps

\begin {align*} \int \frac {1}{(-5-3 \cos (c+d x))^2} \, dx &=-\frac {3 \sin (c+d x)}{16 d (5+3 \cos (c+d x))}-\frac {1}{16} \int \frac {5}{-5-3 \cos (c+d x)} \, dx\\ &=-\frac {3 \sin (c+d x)}{16 d (5+3 \cos (c+d x))}-\frac {5}{16} \int \frac {1}{-5-3 \cos (c+d x)} \, dx\\ &=\frac {5 x}{64}-\frac {5 \tan ^{-1}\left (\frac {\sin (c+d x)}{3+\cos (c+d x)}\right )}{32 d}-\frac {3 \sin (c+d x)}{16 d (5+3 \cos (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 43, normalized size = 0.77 \begin {gather*} -\frac {5 \text {ArcTan}\left (2 \cot \left (\frac {1}{2} (c+d x)\right )\right )+\frac {6 \sin (c+d x)}{5+3 \cos (c+d x)}}{32 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-5 - 3*Cos[c + d*x])^(-2),x]

[Out]

-1/32*(5*ArcTan[2*Cot[(c + d*x)/2]] + (6*Sin[c + d*x])/(5 + 3*Cos[c + d*x]))/d

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 46, normalized size = 0.82

method result size
derivativedivides \(\frac {-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{16 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+4\right )}+\frac {5 \arctan \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}\right )}{32}}{d}\) \(46\)
default \(\frac {-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{16 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+4\right )}+\frac {5 \arctan \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2}\right )}{32}}{d}\) \(46\)
risch \(-\frac {i \left (5 \,{\mathrm e}^{i \left (d x +c \right )}+3\right )}{8 d \left (3 \,{\mathrm e}^{2 i \left (d x +c \right )}+10 \,{\mathrm e}^{i \left (d x +c \right )}+3\right )}+\frac {5 i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+3\right )}{64 d}-\frac {5 i \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {1}{3}\right )}{64 d}\) \(83\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-5-3*cos(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(-3/16*tan(1/2*d*x+1/2*c)/(tan(1/2*d*x+1/2*c)^2+4)+5/32*arctan(1/2*tan(1/2*d*x+1/2*c)))

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 68, normalized size = 1.21 \begin {gather*} -\frac {\frac {6 \, \sin \left (d x + c\right )}{{\left (\frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + 4\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - 5 \, \arctan \left (\frac {\sin \left (d x + c\right )}{2 \, {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}{32 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5-3*cos(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/32*(6*sin(d*x + c)/((sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 4)*(cos(d*x + c) + 1)) - 5*arctan(1/2*sin(d*x +
c)/(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 59, normalized size = 1.05 \begin {gather*} -\frac {5 \, {\left (3 \, \cos \left (d x + c\right ) + 5\right )} \arctan \left (\frac {5 \, \cos \left (d x + c\right ) + 3}{4 \, \sin \left (d x + c\right )}\right ) + 12 \, \sin \left (d x + c\right )}{64 \, {\left (3 \, d \cos \left (d x + c\right ) + 5 \, d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5-3*cos(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/64*(5*(3*cos(d*x + c) + 5)*arctan(1/4*(5*cos(d*x + c) + 3)/sin(d*x + c)) + 12*sin(d*x + c))/(3*d*cos(d*x +
c) + 5*d)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.88, size = 190, normalized size = 3.39 \begin {gather*} \begin {cases} \frac {x}{\left (-5 - 3 \cosh {\left (2 \operatorname {atanh}{\left (2 \right )} \right )}\right )^{2}} & \text {for}\: c = - d x - 2 i \operatorname {atanh}{\left (2 \right )} \vee c = - d x + 2 i \operatorname {atanh}{\left (2 \right )} \\\frac {x}{\left (- 3 \cos {\left (c \right )} - 5\right )^{2}} & \text {for}\: d = 0 \\\frac {5 \left (\operatorname {atan}{\left (\frac {\tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{2} \right )} + \pi \left \lfloor {\frac {\frac {c}{2} + \frac {d x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right ) \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{32 d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 128 d} + \frac {20 \left (\operatorname {atan}{\left (\frac {\tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{2} \right )} + \pi \left \lfloor {\frac {\frac {c}{2} + \frac {d x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{32 d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 128 d} - \frac {6 \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{32 d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 128 d} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5-3*cos(d*x+c))**2,x)

[Out]

Piecewise((x/(-5 - 3*cosh(2*atanh(2)))**2, Eq(c, -d*x - 2*I*atanh(2)) | Eq(c, -d*x + 2*I*atanh(2))), (x/(-3*co
s(c) - 5)**2, Eq(d, 0)), (5*(atan(tan(c/2 + d*x/2)/2) + pi*floor((c/2 + d*x/2 - pi/2)/pi))*tan(c/2 + d*x/2)**2
/(32*d*tan(c/2 + d*x/2)**2 + 128*d) + 20*(atan(tan(c/2 + d*x/2)/2) + pi*floor((c/2 + d*x/2 - pi/2)/pi))/(32*d*
tan(c/2 + d*x/2)**2 + 128*d) - 6*tan(c/2 + d*x/2)/(32*d*tan(c/2 + d*x/2)**2 + 128*d), True))

________________________________________________________________________________________

Giac [A]
time = 0.44, size = 59, normalized size = 1.05 \begin {gather*} \frac {5 \, d x + 5 \, c - \frac {12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4} - 10 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 3}\right )}{64 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-5-3*cos(d*x+c))^2,x, algorithm="giac")

[Out]

1/64*(5*d*x + 5*c - 12*tan(1/2*d*x + 1/2*c)/(tan(1/2*d*x + 1/2*c)^2 + 4) - 10*arctan(sin(d*x + c)/(cos(d*x + c
) + 3)))/d

________________________________________________________________________________________

Mupad [B]
time = 0.00, size = 67, normalized size = 1.20 \begin {gather*} \frac {5\,\mathrm {atan}\left (\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}\right )}{32\,d}-\frac {5\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-\frac {d\,x}{2}\right )}{32\,d}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(3*cos(c + d*x) + 5)^2,x)

[Out]

(5*atan(tan(c/2 + (d*x)/2)/2))/(32*d) - (5*(atan(tan(c/2 + (d*x)/2)) - (d*x)/2))/(32*d) - (3*tan(c/2 + (d*x)/2
))/(16*d*(tan(c/2 + (d*x)/2)^2 + 4))

________________________________________________________________________________________